package com.taotao.rest.webservice;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.taotao.rest.pojo.CatResult;
import com.taotao.rest.service.ItemCatService;
import com.taotao.utils.JsonUtils;
@Component
@WebService(serviceName="ItemCatWebService", endpointInterface="com.taotao.rest.webservice.ItemCatWebService")
public class ItemCatWebServiceImpl implements ItemCatWebService {

	@Autowired
	private ItemCatService itemCatService;
	
	@Override
	public String getItemCat(String callback) {
		CatResult catResult = new CatResult();
		catResult.setData(itemCatService.getItemCat(0L));
		
		String json = JsonUtils.objectToJson(catResult);
		String result = callback + "(" + json + ");";
		return result;
	}
}
